Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace GH action versions with specific commit hashes #1

Merged
merged 8 commits into from
Oct 16, 2024

Conversation

jzemmels
Copy link
Contributor

@jzemmels jzemmels commented Aug 21, 2024

There is a potential security risk where the maintainer of a GitHub Action could retroactively change the code associated with specific, tagged versions of the action (e.g., v1, v2). Laura DeCicco proposed an alternative to replace version numbers in GitHub Action yml files with the specific commit hashes associated with those release versions, which are immutable.

This PR makes those changes for the seven instances where an external action is invoked. I couldn't identify the exact version for some of the actions (e.g., there are multiple v2.#.# versions for checkout), which may explain why the build actions are currently failing. Or perhaps I don't have the permissions to run certain commands in the repo. Feel free to propose different commit hashes if you know more than I do about the action versions.

@ehinman
Copy link
Collaborator

ehinman commented Oct 16, 2024

@jzemmels, I looked into the failing CI job messages and found an insight here: percy/exec-action#23. I'm wondering if we should update the actions to their latest release hashes. My guess is that changes were made to make the v2/v3 actions forward compatible, but not the actual hash versions.

Additionally, do you mind changing the target of this merge request from candidate-release to main?

@jzemmels
Copy link
Contributor Author

@jzemmels, I looked into the failing CI job messages and found an insight here: percy/exec-action#23. I'm wondering if we should update the actions to their latest release hashes. My guess is that changes were made to make the v2/v3 actions forward compatible, but not the actual hash versions.

Additionally, do you mind changing the target of this merge request from candidate-release to main?

Sure, we can update to the most recent versions' commit hashes and see if that fixes the issue.

@jzemmels jzemmels changed the base branch from candidate-release to main October 16, 2024 18:31
@ehinman
Copy link
Collaborator

ehinman commented Oct 16, 2024

Looks good!

@ehinman ehinman merged commit b8cc398 into DOI-USGS:main Oct 16, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants